package com.study.jdk_proxy;

import com.study.demo1.Marry;
import com.study.demo1.You;

public class Demo2 {
    public static void main(String[] args) {
//        System.getProperties().put("sun.misc.ProxyGenerator.saveGeneratedFiles","true");
        //目标对象
        You you = new You();
        //代理类
        JdkProxy jdkProxy = new JdkProxy(you);
        //生成代理对象
        Marry proxy = (Marry) jdkProxy.getProxy();
        proxy.toMarry();

    }
}
